<%-- 
  -- Body View para Debt.
  --
  -- Usa debt.js para muchas funciones.
  --
  -- @author nicolas.gonzalez
--%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-html-el-1.2.8.tld" prefix="html-el"%>
<%@ taglib uri="/WEB-INF/struts-logic-el-1.2.8.tld" prefix="logic-el"%>
<%@ taglib uri="/WEB-INF/security.tld" prefix="security" %>
<%@ taglib uri="/WEB-INF/ajaxtags.tld" prefix="ajax" %>

<%@ taglib uri="http://struts.apache.org/tags-bean-el" prefix="bean2"%>

<script src="<html:rewrite page='/protected/script/util.js'/>" type="text/javascript"></script>

<script src="<html:rewrite page='/protected/script/calendar/calendar.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/calendar/calendar-setup.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/calendar/lang/calendar-es.js'/>" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/calendar/style/calendar-blue.css'/>" id="styleFileAnyId"/>

<%-- Para EXT --%>
<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/script/ext-1.1.1/resources/css/ext-all.css'/>" />

<script src="<html:rewrite page='/protected/script/ext-1.1.1/adapter/ext/ext-base.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ext-1.1.1/ext-all.js'/>" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/style/dragdrop.css'/>" id="styleFileDragDrop"/>
<!-- Para AjaxTags -->
<script src="<html:rewrite page='/protected/script/scriptaculous/scriptaculous.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ajaxtags/ajax/ajaxtags.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ajaxtags/ajax/ajaxtags_parser.js'/>" type="text/javascript"></script>
<script src="<html:rewrite page='/protected/script/ajaxtags/ajax/ajaxtags_controls.js'/>" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="<html:rewrite page='/protected/style/ajaxtags/ajaxtags.css'/>" id="AjaxTagsCssId"/>

<%-- Funcionalidad de manejo de Ajax + JSON + Divs flotantes y esas cosas... --%>
<script src="<html:rewrite page='/protected/script/debt.js'/>" type="text/javascript"></script>

<div class="errors">
    <html:errors />
</div>


<script type="text/javascript">

</script>

<%-- El ID del form NO debe ser modificado. Se usa desde el menu --%>
<html:form action="/protected/viewDebt" styleId="debtFormId">
    
    <%-- Lo dejo asi xq se pierde sino.... --%>
    <input type="hidden" name="id" value="${debtForm.id}" />
    
    <h2>Ver Deuda</h2>
    
    <div class="debtEdit">
        <table class="tableDataDebt" cellspacing="0">
            <tr>
                <td class="tableDataTitle">
                    Saldo
                </td>
                <td class="tableDataValue">
                    <html:text property="balance" styleId="balanceId" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Vigencia Desde
                </td>
                <td class="tableDataValue">
                    <html:text property="validityFrom" styleId="validityFromId" readonly="true"/>
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Vencimiento
                </td>
                <td class="tableDataValue">
                    <html:text property="expiry" styleId="expiryId" readonly="true"/>
                </td>            
            </tr>
            
            <tr>
                <td class="tableDataTitle">
                    Participante
                </td>
                <td class="tableDataValue">
                    <html:text property="studentSurname" styleId="studentSurnameId" readonly="true" size="30" />
                </td>   
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Cliente
                </td>
                <td class="tableDataValue">
                    <html:text property="corporateName" styleId="corporateNameId" readonly="true" size="40" />
                </td>   
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Curso
                </td>
                <td class="tableDataValue">
                    <html:text property="courseSelected" readonly="true" size="40" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Descuentos
                </td>
                <td class="tableDataValue">
                    <html:text property="discountValues" styleId="discountValuesId" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Descuentos (%)
                </td>
                <td class="tableDataValue">
                    <html:text property="discountPerc" styleId="discountPercId" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Beneficios
                </td>
                <td class="tableDataValue">
                    <html:text property="benefitValues" styleId="benefitValuesId" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Beneficios (%)
                </td>
                <td class="tableDataValue">
                    <html:text property="benefitPerc" styleId="benefitPercId" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Tipo de deuda
                </td>
                <td class="tableDataValue">
                    <html:text property="debtTypeSelected" readonly="true" />
                </td>            
            </tr>
            <tr>
                <td class="tableDataTitle">
                    Estado
                </td>
                <td class="tableDataValue">
                    <html:text property="debtStatusStr" readonly="true" />
                </td>            
            </tr>
        </table>

        <div id="clear">
        </div>
        <div id="clear">
        </div>
        
    </div>
    
</html:form>